home *** CD-ROM | disk | FTP | other *** search
/ Day Cry / Day Cry CD.bin / oh_towns / ein / sources / einlib.lzh / LIBSRC.LZH / EIN_FS03.C < prev    next >
C/C++ Source or Header  |  1994-07-18  |  2KB  |  72 lines

  1. /*<Header>==============================================================
  2. *
  3. *    STRINGS OPERATION / "EIN_ST03.C"
  4. *
  5. *        [ EIN(tm) project : ò╢ÄÜù±æÇì∞òΓÅòè╓ÉöîQ ]
  6. *
  7. *    COPYRIGHT  Nam & é▌é±é╜é┴ü⌠  1994, All rights reserved.
  8. *
  9. *-----------------------------------------------------------------------
  10. *    V1.0L01â┐    94.07.16/Nam    âvâìâgâ^âCâv(é▌é±é╜é┴ü⌠é│é±é╠è╓Éöé≡ùÿùp)
  11. *</Header>==============================================================*/
  12. #include    <stdio.h>
  13. #include     <stdlib.h>
  14. #include     <string.h>
  15. #include    <snd.h>
  16. #include    <winb.h>
  17. #include    <te.h>
  18. #include    <fntb.h>
  19. #include    <gui.h>
  20.  
  21. #define    EIN_FSTR
  22. #include    "..\eintm.h"
  23.  
  24. #ifndef NOERR
  25. #define    NOERR    (0)
  26. #endif
  27. #ifndef ERROR
  28. #define    ERROR    (1)
  29. #endif
  30.  
  31. extern char    *EIN_strrchr( char *, char );
  32.  
  33. /*<Func>================================================================
  34. *    int        EIN_fnameNonDirectory( char *src, char *dst )
  35. *
  36. *    üyèT  ùvüz    âpâXû╝é⌐éτâfâBâîâNâgâèòöò¬é≡Å£éóé╜âtâ@âCâïû╝é≡ò╘é╖üB
  37. *
  38. *    üyï@  ö\üz    âpâXû╝é⌐éτâfâBâîâNâgâèòöò¬é≡Å£éóé╜âtâ@âCâïû╝é≡ò╘é╡é▄é╖üB
  39. *
  40. *    üyôⁿ  ù═üz*src        :
  41. *
  42. *    üyÅo  ù═üz*dst        :
  43. *
  44. *    üyè╓ÉöÆlüz    ==0            É│ÅφÅIù╣
  45. *                !=0            ê┘ÅφÅIù╣
  46. *
  47. *    üyÆì  ê╙üz    
  48. *
  49. *    üyÄQ  Å╞üz    EIN_strrchr
  50. *
  51. *-----------------------------------------------------------------------
  52. *    V11L10    1994.07.16/Nam
  53. *</Func>==============================================================*/
  54. int        EIN_fnameNonDirectory( char *src, char *dst )
  55. {
  56.     char    *fnp;    /* âtâ@âCâïû╝ë≡É═â|âCâôâ^ */
  57.     
  58.     if ( src==NULL || dst==NULL ){
  59.         return ERROR;
  60.     }
  61.     if ( ((fnp = EIN_strrchr(src, '\\')) != NULL)||    /* âpâXÄwÆΦé═ùLéΘ? */
  62.          ((fnp = EIN_strrchr(src, ':' )) != NULL)){    /* âhâëâCâuÄwÆΦé═? */
  63.         fnp++;
  64.     } else {
  65.         fnp = src;
  66.     }
  67.     strcpy(dst, fnp);    /* âtâ@âCâïû╝òöé≡âRâsü[ */
  68.  
  69.     return NOERR;
  70. }
  71.  
  72.